<%@ page import = "java.util.Hashtable,
                   ro.xblue.translator.LanguageBean,
                   ro.gateway.aida.servlet.*,
                   ro.gateway.aida.obj.*,
                   ro.xblue.translator.TranslatorUtils,
                   ro.gateway.aida.admin.ActivityObjectsOptions,
                   ro.gateway.aida.admin.ActObjsOptsConst" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="gtw" %>
<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/usr.tld" prefix="usr" %>
<%
	String key = (String) request.getAttribute(EditActivityServlet.PNAME_KEY);
	if ((request.getAttribute(EditActivityServlet.SIGNATURE) == null) || (key == null)) return;

	Hashtable ed_ctx = (Hashtable) request.getAttribute(EditActivityServlet.PNAME_R_CTX);
	LanguageBean lang_bean = TranslatorUtils.getCurrentLanguage(request, application);
	String ctx = request.getContextPath();
	Activity bean = (Activity) ed_ctx.get(EditActivityServlet.PNAME_BEAN);

	String title = bean.getTitle(lang_bean.language);
	if (title == null) title = "";

	String notefield1 = bean.getNoteField1(lang_bean.language);
	if (notefield1 == null) notefield1 = "";
	String notefield2 = bean.getNoteField2(lang_bean.language);
	if (notefield2 == null) notefield2 = "";
	String notefield3 = bean.getNoteField3(lang_bean.language);
	if (notefield3 == null) notefield3 = "";
	String notefield4 = bean.getNoteField4(lang_bean.language);
	if (notefield4 == null) notefield4 = "";

	ActivityObjectsOptions aoo = ActivityObjectsOptions.getInstance();
%>
<trans:initPage module="prj_pages" />
<gtw:get_errors/>
<html>
<head>
	<link rel="shortcut icon" href="<html:rewrite page="/images/lpd.png"/>" type="image/ico" />
 <META HTTP-EQUIV="EXPIRES" CONTENT="0">
 <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<title>Local Projects Database - Project Editor</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="alf.css" type="text/css">
<STYLE>.text_searchbold {
	FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-STYLE: normal; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
; text-decoration: none}
.text_search {
	FONT-SIZE: 8pt; FONT-STYLE: normal; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.text {
	FONT-WEIGHT: normal; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.titlu {
	FONT-WEIGHT: bold; FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A:hover {
	TEXT-DECORATION: underline
}
</STYLE>


<script type="text/javascript">
      // the _editor_url is REQUIRED!  don't forget to set it.
      _editor_url = "/lpd/htmlarea/";
      // implicit language will be "en", but let's set it for brevity
      _editor_lang = "en";
    </script>
    <script type="text/javascript" src="htmlarea/htmlarea.js"></script>
    <script type="text/javascript">
      // load the plugins that we will use
      // loading is necessary ONLY ONCE, regardless on how many editors you create
      // basically calling the following functions will load the plugin files as if
      // we would have wrote script src="..." but with easier and cleaner code


      // this function will get called at body.onload
      function initDocument() {
        // cache these values as we need to pass it for both editors
        var css_plugin_args = {
          combos : [
            { label: "Syntax",
                         // menu text       // CSS class
              options: { "None"           : "",
                         "Code" : "code",
                         "String" : "string",
                         "Comment" : "comment",
                         "Variable name" : "variable-name",
                         "Type" : "type",
                         "Reference" : "reference",
                         "Preprocessor" : "preprocessor",
                         "Keyword" : "keyword",
                         "Function name" : "function-name",
                         "Html tag" : "html-tag",
                         "Html italic" : "html-helper-italic",
                         "Warning" : "warning",
                         "Html bold" : "html-helper-bold"
                       },
              context: "pre"
            },
            { label: "Info",
              options: { "None"           : "",
                         "Quote"          : "quote",
                         "Highlight"      : "highlight",
                         "Deprecated"     : "deprecated"
                       }
            }
          ]
        };

        //---------------------------------------------------------------------
        // GENERAL PATTERN
        //
	//  1. Instantitate an editor object.
	//  2. Register plugins (note, it's required to have them loaded).
	//  3. Configure any other items in editor.config.
	//  4. generate() the editor
	//
	// The above are steps that you use to create one editor.  Nothing new
	// so far.  In order to create more than one editor, you just have to
	// repeat those steps for each of one.  Of course, you can register any
	// plugins you want (no need to register the same plugins for all
	// editors, and to demonstrate that we'll skip the TableOperations
	// plugin for the second editor).  Just be careful to pass different
	// ID-s in the constructor (you don't want to _even try_ to create more
	// editors for the same TEXTAREA element ;-)).
	//
	// So much for the noise, see the action below.
	//---------------------------------------------------------------------


        //---------------------------------------------------------------------
        // CREATE FIRST EDITOR
        //

        var editor1 = new HTMLArea("notefield1");

        // plugins must be registered _per editor_.  Therefore, we register
        // plugins for the first editor here, and we will also do this for the
        // second editor.

        // custom config must be done per editor.  Here we're importing the
        // stylesheet used by the CSS plugin.
        editor1.config.pageStyle = "@import url(custom.css);";

        // generate first editor
        editor1.generate();
        //---------------------------------------------------------------------


        var editor2 = new HTMLArea("notefield2");
        editor2.config.pageStyle = "@import url(custom.css);";

          setTimeout(function() {
          editor2.generate();
        }, 500);

        var editor3 = new HTMLArea("notefield3");
        editor3.config.pageStyle = "@import url(custom.css);";

          setTimeout(function() {
          editor3.generate();
        }, 500);

        var editor4 = new HTMLArea("notefield4");
        editor4.config.pageStyle = "@import url(custom.css);";

          setTimeout(function() {
          editor4.generate();
        }, 500);


        //---------------------------------------------------------------------
      };
    </script>
  </head>



<script language="javascript">
	var ed_con_orgs_win;
	var ed_con_pers_win;
	function open_con_orgs() {
		ed_con_orgs_win = window.open(
		"org/selector.do",
		"ed_con_win", "HEIGHT=400,WIDTH=500,scrollbars=yes");
	};
	function help(pageName) {
		ed_donor_orgs_win = window.open(
		"<%=ctx%>/help/UserGuide.pdf",
		"ed_fin_win", "HEIGHT=500,WIDTH=700");
	};
	function real_submit() {
		document.theform.action.value = '<%=EditActivityServlet.ACTION_SUBMIT%>';
		document.theform.onsubmit();
		document.theform.submit();
	}
</script>
</head>

<body  onload="initDocument()" bgcolor="#FFFFFF" text="#000000" topmargin=0 leftmargin=0>
<jsp:include page="header.jsp" />
<br><div align=center class=text_bold><trans:showPageMessage label="p.proiect00" /></div>
  <table width="98%" border="0" cellspacing="1" cellpadding="4" class="text_searchBold" background=images/pixelbgtable.gif align="center">
    <tr>
      <td bgcolor="#FFFFFF" class="text_searchBold" width="30%">
          <table width="100%" cellpadding="0" cellspacing="0" border="0">
               <tr>
                    <td class="text_searchBold" width="10%">
                         <trans:showPageMessage label="p.editor" />
                    </td>
                    <td>
                         <usr:logged_user cellClass="text_search" showLoginLink="false" />
                    </td>
               </tr>
          </table>
      </td>
      <td background=images/pixelbgtable.gif width=35%>
        <div align="center" class="textalb"><trans:showPageMessage label="p.proiect" /></div>
      </td>
      <td bgcolor="#FFFFFF" colspan=2>
        <div align="center"><a href="org/edit" class="text_searchBold"><trans:showPageMessage label="p.organiz" /></a></div>
      </td>
  </tr>
  </table>

  <table width="98%" border="0" cellspacing="1" cellpadding="5" background=images/pixelbgtable.gif align=center>
    <tr bgcolor="#FFFFFF">
      <td align="center" width="75%" class="textalb" background=images/pixelbgtable.gif>
<trans:showPageMessage label="p.page4" />
      </td>
      <td width="25%" class="text_searchBold" background=images/pixelbgtable.gif>&nbsp;

      </td>
    </tr>
<form name="theform" method="post" action="editActivity" id="theform">
<input type="hidden" name="prj_jump" value="" />
<input type="hidden" name="action" value="<%=EditActivityServlet.ACTION_SUBMIT%>" />
<input type="hidden" name="key" value="<%=key%>" />
<input type="hidden" name="page" value="7" />
<input type="hidden" name="after_selector" value="" />
<input type="hidden" name="preview_data" value="false" />
    <tr bgcolor="#FFFFFF">
      <td width="75%" bgcolor="f9f9f9" class="text_search">

      <% if (aoo.isEnabled(ActObjsOptsConst.NOTEFIELDS)) { %>
		<gtw:show_error label='<%=ActObjsOptsConst.NOTEFIELDS%>' /><br>
		<p><img src=images/arrow_blue.gif hspace=4><b><trans:showPageMessage label="p.notefields" /><%=(aoo.isMandatory(ActObjsOptsConst.NOTEFIELDS)) ? "(<font color=red>*</font>)" : ""%></b> </p>
		<div align="center">
			<table width="70%" cellpadding="5" border="0" cellspacing="1" background=images/pixelbgtable.gif>
				<tr>
				<td class="text_searchbold" bgcolor="#FFFFFF"><trans:showPageMessage label="p7.notefield1" /></td>
				</tr>
				<tr>
				<td class="text_search" bgcolor="#FFFFFF">
					<textarea id="notefield1" name="notefield1" cols="90" rows="18"><%=notefield1%></textarea>
				</td>
				</tr>
			</table>
			<br/>
			<table width="70%" cellpadding="5" border="0" cellspacing="1" background=images/pixelbgtable.gif>
				<tr>
				<td class="text_searchbold" bgcolor="#FFFFFF"><trans:showPageMessage label="p7.notefield2" /></td>
				</tr>
				<tr>
				<td class="text_search" bgcolor="#FFFFFF">
					<textarea name="notefield2" id="notefield2" cols="90" rows="18"><%=notefield2%></textarea>
				</td>
				</tr>
			</table>
			<br/>
			<table width="70%" cellpadding="5" border="0" cellspacing="1" background=images/pixelbgtable.gif>
				<tr>
				<td class="text_searchbold" bgcolor="#FFFFFF"><trans:showPageMessage label="p7.notefield3" /></td>
				</tr>
				<tr>
				<td class="text_search" bgcolor="#FFFFFF">
					<textarea id="notefield3" name="notefield3" cols="90" rows="18"><%=notefield3%></textarea>
				</td>
				</tr>
			</table>
			<br/>
			<table width="70%" cellpadding="5" border="0" cellspacing="1" background=images/pixelbgtable.gif>
				<tr>
				<td class="text_searchbold" bgcolor="#FFFFFF"><trans:showPageMessage label="p7.notefield4" /></td>
				</tr>
				<tr>
				<td class="text_search" bgcolor="#FFFFFF">
						<textarea id="notefield4" name="notefield4" cols="90" rows="18"><%=notefield4%></textarea>
				</td>
				</tr>
			</table>
			<br/>
		</div>
	<% } %>

		<trans:showPageMessage label="translator.showhiddentags"/>
        <br><br>
        <div align="center">
        <input type="button" name="un_nume" value="<trans:showPageMessage label="p.sinfo" hide_link="true" />" onClick="javascript:document.theform.action.value='<%=EditActivityServlet.ACTION_SUBMIT%>';real_submit();" class="butonsave"/>
        </div>

      </td>
      <td width="25%" valign="top">
<!-- meniu dreapta -->
<table width="98%" border="0" cellspacing="1" cellpadding="2" bgcolor="#000066">
<tr>
	      <td bgcolor="#000066" align="center"><b> <span class="textalb"><trans:showPageMessage label="p.proj" />:</span>
            <span class="textalb"><font color="#F9E031"><%=title%></font></span></b></td>
</tr>
<tr>
	<td background=images/pixelbgtable.gif class="textalb">
		<img src=images/arrow_white_tr.gif>
		<a
            onclick="javascript:theform.prj_jump.value='1';document.theform.onsubmit();document.theform.submit();"
            style="cursor:hand;"
            class="textalb"><trans:showPageMessage label="md.identif" /></a>
	</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='1';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.plan" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='2';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.loc" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='2';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.sec" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='2';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.comp" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='3';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.fin" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='3';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.prel" /></a>
</td>
</tr>

<tr>
          <td background=images/pixelbgtable.gif class="textalb"> <img src=images/arrow_white_tr.gif>
            <a href="editActivity?key=<%=key%>&page=4" class="textalb"><trans:showPageMessage label="md.cauth" /></a>
          </td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='5';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.ben" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='5';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.descobj" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='6';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.docl" /></a>
</td>
</tr>
<tr>
<td background=images/pixelbgtable.gif class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:theform.prj_jump.value='6';document.theform.onsubmit();theform.submit();"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="md.pinv" /></a>
</td>
</tr>
<% if (aoo.isEnabled(ActObjsOptsConst.NOTEFIELDS)) { %>
<tr>
<td bgcolor="#336699"  class="textalb">
	<img src=images/arrow_white_tr.gif>
	<a
      onclick="javascript:"
      style="cursor:hand;"
      class="textalb"><trans:showPageMessage label="p.notefields" /></a>
</td>
</tr>
<% } %>
<tr>
          <td background=images/pixelbgtable.gif align="center">
            <input type="button" name="Help" class="buton" value="<trans:showPageMessage label="p.help" hide_link="true" />"
          onClick="javascript:help('aboutPage4.htm');">
          </td>
</tr>
<tr>
<td background=images/pixelbgtable.gif height="45">
<div align="center">
<input	type="button" onclick="javascript:document.theform.action.value='<%=EditActivityServlet.ACTION_SUBMIT%>';document.theform.preview_data.value='true';real_submit();"
	value='<trans:showPageMessage label="p.pubinfo" hide_link="true" />'
	class="butonpublish"
/>
<trans:showPageMessage label="translator.showhiddentags"/>
</div>
</td>
</tr>
</table>
<!-- ziendof meniu dreapta -->
      </td>
    </tr>
  </table>
<script type="text/javascript" src="<html:rewrite page='/javascript/textCounter.js'/>"></script>
</form>
<jsp:include page="footer.jsp" />
</body>
 <HEAD>
 <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
 </HEAD>
</html>
<!--
-->
